import java.util.Enumeration;
import java.util.Vector;

public abstract class Subject {
	
	private Vector<Observer> observers = new Vector<>();

	void add(Observer observer){
		observers.add(observer);
	}

	void remove(Observer observer){
		observers.remove(observer);
	}

	void notifyObserver(){
		Enumeration<Observer> enu = observers.elements();
		while(enu.hasMoreElements()){
			enu.nextElement().update();
		}
	}
	
	abstract void operation();
}
